package com.redis.service.impl;

import java.util.Arrays;

import org.springframework.stereotype.Service;

import com.entity.User;
import com.redis.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Override
	public User getUser(String username) {

		System.out.println("select user from mysql");
		// 模拟数据库查询
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return new User(1, username, "tom", "password", "abc@126.com", Arrays.asList("Beijing"));
	}

}
